package com.samoiloff.ui.btns.frame {
	import flash.events.MouseEvent;

	import Boolean;
	import com.samoiloff.ui.btns.frame.FrameBtnController;

	import flash.display.MovieClip;

	/**
	 * @author NM Group
	 */
	public class FrameEnabledBtnController extends FrameBtnController {
		
		protected var _enabled: Boolean;

		public function FrameEnabledBtnController(mc:MovieClip) {
			super(mc);
			enabled = true;
		}

		public function get enabled(): Boolean {
			return _enabled;
		}
		
		public function set enabled(enabled: Boolean): void {
			_enabled = enabled;
//			_mc.mouseEnabled = _enabled;
			_mc.gotoAndStop(_enabled ? 1 : 4);
		}

		
		override protected function onMouseOut(e: MouseEvent = null): void {
			super.onMouseOut(e);
			if (!_enabled) {
				_mc.gotoAndStop(4);
			}
		}
	}
}
